#ifndef					_SPARSEMATRIX_H_
#define					_SPARSEMATRIX_H_

#include <map>
#include "Dictionary.h"
#include "SparseMatrix.h"

template<class T>
class SparseMatrix
{
public:
	SparseMatrix()
	{
	}

	~SparseMatrix()
	{
		m_data.clear();
	}

	void SetList(int x, int y, T data)
	{
		m_data[std::make_pair((x, y))] = data;
	}

	T& operator()(int x, int y)   
	{
		return m_data[std::make_pair(x, y)];
	}

private:
	std::map<std::pair<int, int>, T>		m_data;
};
#endif					//_SPARSEMATRIX_H_

